home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
usenet
/
sources
/
volume91
/
devices
/
btntape2
/
part01
/
tape.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-05
|
2KB
|
46 lines
/* BTNtape include file, version 2.0 */
/* Operations supported by TapeIO */
#define TSENSE 0 /* request sense */
#define TREADY 1 /* test unit ready */
#define TREAD 2 /* read blocks */
#define TWRITE 3 /* write blocks */
#define TREWIND 4 /* rewind tape */
#define WFMARK 5 /* write file mark */
#define TSKIP 6 /* skip over files */
#define INQUIRY 7 /* read device info */
#define MDSET 8 /* mode-set */
#define MDSNS 9 /* mode-sense */
#define USRMODE 10 /* user mode-set */
#define RDCAP 11 /* read capacity */
#define RAWCMD 12 /* send user scsi command to tape */
#define TFINISH 13 /* wait for last operation to finish */
/* these control how fast TapeIO returns to the caller */
#define CTLWAIT 0 /* return when operation is done */
#define CTLIMM 1 /* return immediately */
/* Supported device types (from INQUIRY) */
#define SEQ (inq[0]==0x01) /* sequential */
#define DAC (inq[0]==0x10) /* direct-access */
#define BADLUN (inq[0]==0x7f) /* oops */
/* inline message print functions */
#define MPR0(XYZ) sprintf(dbb,XYZ); MonPrint()
#define MPR1(XYZ,V1) sprintf(dbb,XYZ,V1); MonPrint()
#define MPR2(XYZ,V1,V2) sprintf(dbb,XYZ,V1,V2); MonPrint()
#define MPR3(XYZ,V1,V2,V3) sprintf(dbb,XYZ,V1,V2,V3); MonPrint()
/* function prototypes */
void _main(void);
long TapeIO(int,int,int);
int DoSense(long);
long wrteot(int,int,long);
void freestuff(void);
int getstart(long *);
void MonPrint(void);
void toUPPER(char *);
long NewTape(void);
void returnpkt(struct DosPacket *, ULONG, ULONG);
struct DosPacket *taskwait(void);